package com.tianyang.yukuaifuzs.business.auth.adapter;

import androidx.fragment.app.FragmentManager;
import androidx.fragment.app.FragmentPagerAdapter;

import com.tianyang.yukuaifuzs.base.BaseFragment;
import com.tianyang.yukuaifuzs.business.auth.fragment.MerchantAuthorFragment;
import com.tianyang.yukuaifuzs.business.auth.fragment.MerchantCheckFragment;
import com.tianyang.yukuaifuzs.business.auth.fragment.MerchantRefuseFragment;
import com.tianyang.yukuaifuzs.business.auth.fragment.MerchantSubmitFragment;

import java.util.ArrayList;

/**
 * Description：商户信息管理
 * Created by xyj on 2024/3/8
 */
public class MerchantInfoManageAdapter extends FragmentPagerAdapter {

    ArrayList<BaseFragment> fragments = new ArrayList<>();

    public MerchantInfoManageAdapter(FragmentManager fm) {
        super(fm, BEHAVIOR_RESUME_ONLY_CURRENT_FRAGMENT);
        fragments.add(new MerchantSubmitFragment());
        fragments.add(new MerchantCheckFragment());
        fragments.add(new MerchantAuthorFragment());
        fragments.add(new MerchantRefuseFragment());
    }

    @Override
    public BaseFragment getItem(int position) {
        return fragments.get(position);
    }

    @Override
    public int getCount() {
        return fragments.size();
    }

    @Override
    public CharSequence getPageTitle(int position) {
        return "";
    }
}
